import { Controller, UseFilters, UseInterceptors, UsePipes, ValidationPipe, UseGuards } from '@nestjs/common';
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
import { Crud, CrudController } from '@nestjsx/crud';
import { VillageBulletinBoard } from 'libs/db/entity/village-bulletin-board.entity';
import { HttpExceptionFilter } from '../_filter/http-exception.filter';
import { LoggingInterceptor } from '../_interceptor/logging.interceptor';
import { VillageBulletinBoardCrudOps } from './village-bulletin-board-crud-ops';
import { VillageBulletinBoardService } from './village-bulletin-board.service';
import { AuthGuard } from '@nestjs/passport';


@Crud(VillageBulletinBoardCrudOps)
@UseFilters(HttpExceptionFilter)
@UsePipes(ValidationPipe)
@UseInterceptors(LoggingInterceptor)
@UseGuards(AuthGuard('jwt-web'))
@ApiBearerAuth()
@ApiTags('发布管理 - 村告栏')   //标签
@Controller('village-bulletin-board')
export class VillageBulletinBoardController implements CrudController<VillageBulletinBoard> {
  constructor(public service: VillageBulletinBoardService) {
  }
}
